******************************************************************************************************
******************************************************************************************************											    ****
*            Baturo and Tolstrup. Strategic Communication in Dictatorships:   **              Performance, Patriotism, and Intimidation. Journal of Politics *                                                                                                  *                                                                             *
******************************************************************************************************
******************************************************************************************************

ANALYSES ARE IN R3.5.2 AND STATA 16.1 (Mac OS 12.6.2)

** Change working directory to ~/ReplicationFiles **

REPLICATION:

1) To replicate Tables 1-2 and Figures 1 and 3, run Analyses_main.do in Stata.
2) To replicate Figure 2, run Analyses_R_figures.R in R.
3) To replicate supplementary appendix, run Analyses_supplementary.do in Stata.
4) To replicate Figures 1 and 2 in the appendix, run Analyses_R_figures.R in R. 

5) To also replicate construction of estimation files for steps 1 to 4 above, first run:

a) For text analyses (latent semantic scaling and supplementary, i.e., dictionary, analyses), run Text_analyses.R in R. This creates new data files in TextAnalyses/results folder.
b) To construct estimation_file.dta and estimation_file_unga.dta, following Text_analyses.R then run make_estimation_file.do in Stata (to process new data files created in Text_analyses.R, assign labels, add explanatory variables from data/vars folder, etc).


FILES IN THE MAIN DIRECTORY:

01_readme.txt - this directory file.

Analyses_main.do contains commands to replicate the main analyses.

Analyses_supplementary.do contains commands to replicate supplementary appendix analyses.

Analyses_R_figures.R contains commands to replicate Figure 2 (paper) and several appendix figures.

codebook.xlsx includes information on variables used.

estimation_file.dta is the main Stata data file for the analyses of post-Soviet speeches.

estimation_file_unga.dta is the supplementary data file for the analyses of international speeches delivered at the UN General Assembly.

make_estimation_file.do contains commands to create estimation_file.dta, estimation_file_unga.dta, and TextAnalyses/results/russia_all.dta (supplementary file used in the appendix). 

Text_analyses.R contains commands to replicate text analyses (dependent variables construction).

FOLDERS IN THE MAIN DIRECTORY:

data folder contains sov_corpus.RDS (text corpus of post-soviet presidential addresses), ungd_corpus.RDS (supplementary text corpus of UN speeches), rus_corpus.RDS (supplementary text corpus of all of Putin’s speeches), media folder (the results of media coverage search for Russia and Kazakhstan), and vars subfolder that includes input Stata files used in the construction of estimation_file.dta and estimation_file_unga.dta, as explained above. 

output folder includes logs from R (RConsole.pdf) and Stata (analyses_main_3apr2023.smcl), figures produced and included in the paper and supplementary appendix. 

TextAnalyses folder contains two .yml dictionary files used in Text_analyses.R (step 5a above) as well as results folder where results of Text_analyses.R are saved (steps 5a and 5b above).

** the end **


